package cn.drenal.capcap.controller.forum;

import cn.dev33.satoken.annotation.SaIgnore;
import cn.drenal.capcap.common.Response;
import cn.drenal.capcap.entity.Category;
import cn.drenal.capcap.entity.vo.forum.ForumUpcomingActivityVO;
import cn.drenal.capcap.service.UpcomingActivityService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 前台活动预告控制器
 */

@RestController
@RequestMapping("/forum/upcoming")
@RequiredArgsConstructor
public class ForumUpcomingActivityController {

    private final UpcomingActivityService upcomingActivityService;
    /**
     * 获取随机活动预告
     *
     * @return 活动预告列表
     */
    @SaIgnore
    @GetMapping("/random-upcoming")
    public Response<List<ForumUpcomingActivityVO>> getUpcomingActivities() {
        return Response.success(upcomingActivityService.getRandomUpcomingActivities());
    }

}
